<script setup>
import { onMounted, ref } from 'vue';
const btn = ref(null)

onMounted(() => {
})

</script>
<template>
    <!-- 需要导入npm install @element-plus/icons-vue然后注册 -->
    <div>
        size设置尺寸
        <el-icon :size="20" ref="btn">
            <Edit />
        </el-icon>

    </div>

    <div>
        在一个button里写就可以实现图标加文字
        <el-button type="primary">
            <el-icon style="vertical-align: middle">
                <Search />
            </el-icon>
            <span style="vertical-align: middle"> Search </span>
        </el-button>
    </div>


    <div>加入is-loading类名会自动按照2秒一圈旋转
        <el-icon class="is-loading">
            <Search />
        </el-icon>
    </div>

</template>